using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartLauncher
{
	public partial class ConfigDialog : Form
	{
		public ConfigDialog()
		{
			InitializeComponent();
		}

		private void ConfigDialog_Load(object sender, EventArgs e)
		{
			chkHideWhenMinimized.Checked = Properties.Settings.Default.HideWhenMinimized;
			chkConfirmExit.Checked = Properties.Settings.Default.ConfirmExit;
			chkGroupApplications.Checked = Properties.Settings.Default.GroupApplications;
			chkAutomaticBackup.CheckState = Properties.Settings.Default.AutomaticBackup;
			chkUpdatedOnStart.Checked = Properties.Settings.Default.UpdateOnStart;
			chkUpdateOnLaunch.Checked = Properties.Settings.Default.UpdateOnLaunch;
		}

		private void btOK_Click(object sender, EventArgs e)
		{
			Properties.Settings.Default.HideWhenMinimized = chkHideWhenMinimized.Checked;
			Properties.Settings.Default.ConfirmExit = chkConfirmExit.Checked;
			Properties.Settings.Default.GroupApplications = chkGroupApplications.Checked;
			Properties.Settings.Default.AutomaticBackup = chkAutomaticBackup.CheckState;
			Properties.Settings.Default.UpdateOnStart = chkUpdatedOnStart.Checked;
			Properties.Settings.Default.UpdateOnLaunch = chkUpdateOnLaunch.Checked;

			Properties.Settings.Default.Save();
			DialogResult = DialogResult.OK;
		}
	}
}